package logic;

import ui.Screen;

/** Represents account info ATM transaction,
 * extending Transaction
 * @author Matthias
 */
public class AccountInfo extends Transaction {

	/** Invokes the overridden superclass's constructor perform
	 * @param perform
	 */
	public AccountInfo(final PerformTransactions perform) {
		super(perform);
	} 

		
	/** takes action from Transaction and corresponding from PerformTransactions
	 * @see logic.Transaction#execute()
	 */
	@Override
	public void execute() {	
		// getting the information for the logged in account.
		getClassPerform().getClassATM().getClassScreen().getAccAccountInfo().showFields(getAccNr(),
				getAccType(), getInterestRate(), getTotBal());
		// display the balance information on the screen
		getClassPerform().getClassATM().getClassScreen().show(Screen.ACCACCOUNTINFO);
	}

} // end class AccountInfo